package com.qf.mapper;

import com.qf.commons.TableData;
import com.qf.entity.Notify;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface NotifyDao {
    //根据用户id获取所有通知的信息
    List<Notify> getNotify(Integer uid);
    //未读通知改变为已读状态
    void changeNotifyStatus(@Param("uid")Integer uid, @Param("nid")Integer nid);
    //添加新的通知
    void insertNotify(@Param("uid")Integer uid,
                      @Param("title")String title,
                      @Param("path")String path,
                      @Param("createTime")Date createTime,
                      @Param("updateTime")Date updateTime);

    //获取未读通知
    List<Notify> getUnreadNotify(Integer uid);
    //获取未读通知数量
    Integer getUnreadNotifyCount(Integer uid);

    //改变通知内容
    void changeNotifyContent(@Param("uid")Integer uid,
                             @Param("title")String title,
                             @Param("path")String path,
                             @Param("updateTime")Date updateTime,
                             @Param("nid")Integer nid
                            );
    //改为已读通知为未读
    void changeReadNotify(@Param("nid")Integer nid);
}
